﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="OrderForm.aspx.cs" Inherits="ERP.OrderForm" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div dir="rtl">
        <table border="0">
            <tr>
                <td>
                    <span><asp:Localize ID="locOrderID" runat="server" meta:resourcekey="OrderID"></asp:Localize></span> 
                </td>
                <td>
                    <asp:Label runat="server" ID="LabelOrderNumber"></asp:Label>
                </td>
                <td>
                <asp:Button runat="server" ID="ButtonDeleteOrder" Text="Delete Order" Visible="true" OnClick="onClickDeleteOrder" meta:resourcekey="DeleteOrder"/></td>
            </tr>
            
            <tr>
                <td>
                    <span><asp:Localize ID="LocSupplier" runat="server" meta:resourcekey="Supplier"></asp:Localize></span> 
                </td>
                <td>
                    <asp:DropDownList runat="server" ID="DropDownListSupplier">
                    </asp:DropDownList>
                </td>
                <td>
                    <a href="" onclick="window.open('SupplierForm.aspx','הוספת ספק','width=330,height=250')">
                        [<span><asp:Localize ID="LocAddSupplier" runat="server" meta:resourcekey="AddSupplier"></asp:Localize></span>]</a>
                </td>
            </tr>

            <tr>
                <td>
                    <span><asp:Localize ID="LocOrderReason" runat="server" meta:resourcekey="OrderReason"></asp:Localize></span> 
                </td>
                <td>
                    <asp:TextBox runat="server" ID="TextBoxReason" Width="98%"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidatorReason" runat="server" ControlToValidate="TextBoxReason"
                        Display="Static" Text="שדה חובה" ValidationGroup="submitOrder" CssClass="failureNotification"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ValidationExpression="^.{0,50}$" ID="validatorReasonRegex" runat="server" ControlToValidate="TextBoxReason" Text="השדה יכול להיות עד 50 תווים*" CssClass="failureNotification"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td>
                    <ERP:ItemsReport ID="ItemsInOrder" runat="server" />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:button runat="server" text="Add Item To Order" UseSubmitBehavior="true" ID="ButtonAddItemToOrder"
                        OnClick="btn_click_add_item_to_order" meta:resourcekey="AddItemToOrder"/>
                </td>
            </tr>
            <tr>
                <td colspan="3">
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label runat="server" ID="LabelPurchseDescription" AssociatedControlID="txtPurchseDescription"><asp:Localize ID="LocOrderDetails" runat="server" meta:resourcekey="OrderDetails"></asp:Localize></asp:Label>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:TextBox runat="server" ID="txtPurchseDescription" Width="98%" TextMode="MultiLine"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="reqtxtPurchseDescription" runat="server" ControlToValidate="txtPurchseDescription"
                        Display="Static" Text="שדה חובה" ValidationGroup="submitOrder" CssClass="failureNotification"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                    <span><asp:Localize ID="LocPrice" runat="server" meta:resourcekey="Price"></asp:Localize></span>
                </td>
                <td>
                    <asp:Label runat="server" ID="LabelCurrentPrice"></asp:Label>
                </td>
            </tr>
        </table>
        <asp:Button runat="server" Text="Send order for manager approval" UseSubmitBehavior="true"
            ID="Button1" OnClick="btn_click" ValidationGroup="submitOrder" meta:resourcekey="SendOrderToManager"/>
        <asp:Label runat="server" Visible="false" ID="LabelAdded">ההזמנה נשלחה</asp:Label>
        <asp:Button runat="server" Text="Print to screen" UseSubmitBehavior="true" ID="ButtonPrint" OnClick="OnClickButtonPrint" meta:resourcekey="Print"/>
    </div>
</asp:Content>
